package com.ljh.feign;

import com.ljh.pojo.Menu;
import com.ljh.pojo.MenuVo;
import com.ljh.pojo.Type;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "menu")
public interface MenuFeign {
    @GetMapping("/menu/findAll/{page}/{limit}")
    public MenuVo findAll(@PathVariable("page") int page, @PathVariable("limit") int limit);
    @PostMapping("/menu/add")
    public void save(Menu menu);
    @GetMapping("/menu/findById/{id}")
    public Menu findById(@PathVariable("id") long id);
    @PutMapping("/menu/update")
    public void update(Menu menu);
    @GetMapping("/menu/delete/{id}")
    public void deleteById(@PathVariable("id") long id);
    @RequestMapping("/menu/findTypes")
    public List<Type> findTypes();


}
